package com.guigu.www.erp.dehao.service;

import com.guigu.www.erp.common.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface DHMManufactureService {

    void insertSelective(MManufacture mManufacture);
    MManufacture selectByPrimaryKey(Integer id);
    void updateByPrimaryKeySelective(MManufacture mManufacture);

    //查询通过审核并没有派工的
    PageVo<MApply> queryByCheckMApply1(Integer pageNum,Integer pageSize);

    //查询通过审核并没有派工的条数
    Integer numberManufactureTagGroup0();
    Integer numberManufactureTag0();

    //根据产品编号查询
    MDesignProcedure DHQueryByProductId(String productId);

    String queryMaxManufacture();

    //根据parentId查
    List<MDesignProcedureDetails> queryByParentIdProcedureDetails(String parentId);

    //根据parentId查产品设计物料
    List<MDesignProcedureModule> queryByParentIdModule(Integer parentId);

    void insertModule(MProcedureModule mProcedureModule);

    void insertProcedure(MProcedure mProcedure);

    //修改生产计划表的派工状态
    void updateMApplyTag(MApply mApply);

    //查询所有可以审核的生产计划
    PageVo<MManufacture> queryAllByCheckTag(Integer pageNum,Integer pageSize);

    //查询生产需要的物料
    List<MProcedureModule> queryByParentIdPM(Integer parentId);

    //查询所有，不限状态
    PageVo<MManufacture> queryAllMManufacture(Integer pageNum,Integer pageSize,
            String productName, String startTime, String endTime);

    //查询三种状态的数量
    Integer queryByCheckTag0();
    Integer queryByCheckTag1();
    Integer queryByCheckTag2();

    //添加出库单
    void insertSPay(SPay sPay);

    //添加出库明细
    void insertSPayDetails(SPayDetails sPayDetails);

    String queryMaxSPay();

    //查询物料数量
    Integer queryModuleAmount(String arr);
    Integer queryModuleSubtotal(String arr);

    List<MProcedureModule> queryArrModuleDetails(String arr);

    void updateMProcedureById(MProcedure mProcedure);
}
